package indigo.sound
{
	
	
	
	
	
	
	
	
	/**
	 * The playSound function is used as a shortcut to play and add sounds to the SoundController
	 * @param	String that indicates the linkage name of the sound file
	 * @param	Number that indicates the volume of the loaded sound file
	 * @param	Number that indicates the pan of the loaded sound file
	 * @return	Reference to the SoundController instance
	 * 
	 */
	public function playSound( sound:*, volume:Number = 1.0, pan:Number = 0.0 ):SingleSound 
	{
		// Create SoundController
		var mySound:SingleSound = new SingleSound;
		mySound.attachSound( sound ); 
		mySound.autoClose = true;
		mySound.play( volume, pan );
		
		return mySound;
	}
}
